<?php

/**
 * 检查用户名是否有重名人，给出提示
 * @author dinglin
 *
 */
apf_require_controller("HrAbstract");
class Hr_Ajax_CheckUserNameController extends HrAbstractController {

    public function handle_request() {
        $params = $this->request->get_parameters();
        $params['user_name'] = trim($params['user_name']);
        $bll = new Bll_Hr_User();
        $code = $bll->check_user_name_only($params['user_name']);
        if($code){
            $this->json_encode(1,"有重名员工,请填写“改名”");//被使用
        }else{
            $this->json_encode(0,"");//没被使用
        }
    }

}